<%--
  Created by IntelliJ IDEA.
  User: fire'ge
  Date: 2022/5/2
  Time: 12:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>订 单 管 理</title>
    <link rel="stylesheet" href="/TakeawaySystem/css/Show.css" type="text/css">

</head>
<body>
<div>
    <table id="name-label">
        <tr>
            <td align="center" colspan="4">你好！${user.username}
                <a href="/TakeawaySystem/jsp/BusinessCenter.jsp">退出</a>  </td>
        </tr>
    </table>
    <table>
        <tr>
            <td id= "tableTopic">
                接 单 详 情
            </td>
        </tr>
        <c:if test="${foods.size()>0}">

            <c:forEach begin="0" end="${foods.size()-1}" var="i">
                <c:if test="${books[i].conditionCode==0}">
                <form id="bookForm" method="post" action="business/acceptBook">
                    <tr>
                        <td class="shopTopic">
                            菜名：${foods[i].dishName}

                        </td>
                    </tr>
                    <tr>
                        <td class="description">
                            用户名：${users[i].username}
                        </td>
                    </tr>
                    <td>
                            ${books[i].bookNum}份
                    </td>
                    <td>

                        <input type="hidden" value=1 name="conditionCode">
                        <input type="hidden" value="${books[i].id}" name="bookId">
                        <input type="hidden" value="${foods[i].id}" name="foodId">
                        <input Type="submit" id="accept" name="book" Value="接 单" >
                    </td>
                </form>
                </c:if>
            </c:forEach>
        </c:if>
    </table>
</div>
</body>
</html>
